]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ScreenShield: set LockedHint property from systemd
authorVictor Toso <victortoso@redhat.com>
Thu, 12 May 2016 07:25:49 +0000 (09:25 +0200)
committerVictor Toso <victortoso@redhat.com>
Thu, 12 May 2016 13:24:06 +0000 (15:24 +0200)
Logind recently got support for a hint property in Session Object to
inform if session is Locked or not. It is up to desktop environments
to keep this property up to date.

https://bugzilla.gnome.org/show_bug.cgi?id=764773

js/misc/loginManager.js
js/ui/screenShield.js

index 6ed8262262e023d92ee94b01eca4eeb0694d9351..7db94d4061807ab3e2428eb2ebed5c2f2e2f7982 100644 (file)
@@ -40,6 +40,9 @@ const SystemdLoginSessionIface = '<node> \
 <signal name="Lock" /> \
 <signal name="Unlock" /> \
 <property name="Active" type="b" access="read" /> \
+<method name="SetLockedHint"> \
+    <arg type="b" direction="in"/> \
+</method> \
 </interface> \
 </node>';
 
index d8d991c20efa4ff2919f57aa9e9f4651acb01353..18f512445cf1acb136114695a04c5973fde43634 100644 (file)
@@ -559,6 +559,9 @@ const ScreenShield = new Lang.Class({
         if (prevIsActive != this._isActive)
             this.emit('active-changed');
 
+        if (this._loginSession)
+            this._loginSession.SetLockedHintRemote(active);
+
         this._syncInhibitor();
     },